﻿namespace UniMana.Utils.Configs
{
    public class ServerConfig
    {
        public static string s_strNameServerConfig = "Config"; 
        public static string s_strAutoConfigInternet = "true" ;
        public static string s_strCustomConfig = "false";
              
        public static string s_strNameRem = "Rem"; public static string s_strRem = "true";
        public static string s_strNameServername = "Server name"; public static string s_strServername;
        public static string s_strNameDataBase = "DataBase"; public static string s_strDataBase;
        public static string s_strNameLogin = "Login"; public static string s_strLogin;
        public static string s_strNamePassSQL = "PassSQL"; public static string s_strPassSQL;
        private static string m_strNameConnectionString ;

        public static string m_strConnectionString
        {
            get
            {
                m_strNameConnectionString = @"Server = " + s_strServername + ";Initial Catalog= " + s_strDataBase + ";Persist Security Info=True ;User ID= " + s_strLogin + ";Password=" + s_strPassSQL;
                //mConnectionString = "Server=PC1214yxg;Database=UniMana;Trusted_Connection=True"; //Home server : no user/no password
                return m_strNameConnectionString;
            }
        }

        public static string ConnectionStringBackup
        {
            get
            {
                m_strNameConnectionString = @"Server = " + s_strServername + ";Initial Catalog= " + "master" + ";Persist Security Info=True ;User ID= " + s_strLogin + ";Password=" + s_strPassSQL;
                //mConnectionString = "Server=PC1214yxg;Database=UniMana;Trusted_Connection=True"; //Home server : no user/no password
                return m_strNameConnectionString;
            }
        }

    }
}
